home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / OCETemplates.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  70.9 KB  |  1,715 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        OCETemplates.a
  3. ;
  4. ;    Contains:    Apple Open Collaboration Environment Templates Interfaces.
  5. ;
  6. ;    Version:    Technology:    AOCE Toolbox 1.02
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__OCETEMPLATES__') = 'UNDEFINED' THEN
  21. __OCETEMPLATES__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  30.     include 'Events.a'
  31.     ENDIF
  32. ;        include 'Quickdraw.a'                                        ;
  33. ;            include 'MixedMode.a'                                    ;
  34. ;            include 'QuickdrawText.a'                                ;
  35. ;        include 'OSUtils.a'                                        ;
  36. ;            include 'Memory.a'                                        ;
  37.  
  38.     IF &TYPE('__CONTROLS__') = 'UNDEFINED' THEN
  39.     include 'Controls.a'
  40.     ENDIF
  41. ;        include 'Menus.a'                                            ;
  42.  
  43.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  44.     include 'AppleEvents.a'
  45.     ENDIF
  46. ;        include 'Errors.a'                                            ;
  47. ;        include 'EPPC.a'                                            ;
  48. ;            include 'AppleTalk.a'                                    ;
  49. ;            include 'Files.a'                                        ;
  50. ;                include 'Finder.a'                                    ;
  51. ;            include 'PPCToolbox.a'                                    ;
  52. ;            include 'Processes.a'                                    ;
  53. ;        include 'Notification.a'                                    ;
  54.  
  55.     IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
  56.     include 'Dialogs.a'
  57.     ENDIF
  58. ;        include 'Windows.a'                                        ;
  59. ;        include 'TextEdit.a'                                        ;
  60.  
  61.     IF &TYPE('__OCE__') = 'UNDEFINED' THEN
  62.     include 'OCE.a'
  63.     ENDIF
  64. ;        include 'Aliases.a'                                        ;
  65. ;        include 'Script.a'                                            ;
  66. ;            include 'IntlResources.a'                                ;
  67.  
  68.     IF &TYPE('__OCESTANDARDMAIL__') = 'UNDEFINED' THEN
  69.     include 'OCEStandardMail.a'
  70.     ENDIF
  71. ;        include 'OCEAuthDir.a'                                        ;
  72. ;        include 'OCEMail.a'                                        ;
  73. ;            include 'DigitalSignature.a'                            ;
  74. ;            include 'OCEMessaging.a'                                ;
  75.  
  76. kDETAspectVersion                EQU        -976
  77. kDETInfoPageVersion                EQU        -976
  78. kDETKillerVersion                EQU        -976
  79. kDETForwarderVersion            EQU        -976
  80. kDETFileTypeVersion                EQU        -976
  81.  
  82. ;    "Normal" separation for template IDs within the file (this is just a suggestion; you can use whatever
  83. ;    separation you like, so long as two separate templates don't have overlapping resources): 
  84. kDETIDSep                        EQU        250
  85.  
  86. ; A few predefined base IDs (again, just suggestions): 
  87. kDETFirstID                        EQU        1000
  88. kDETSecondID                    EQU        1000 + kDETIDSep
  89. kDETThirdID                        EQU        1000 + 2 * kDETIDSep
  90. kDETFourthID                    EQU        1000 + 3 * kDETIDSep
  91. kDETFifthID                        EQU        1000 + 4 * kDETIDSep
  92.  
  93. ;    Templates consist of a set of associated resources, at constant offsets from a "base ID" set by the
  94. ;    signature resource of the template. In the case of aspect templates, most of the resources in the
  95. ;    template are accessible from the template as property default values. The property number is the same
  96. ;    as the offset from the base ID of the resource. In describing the resources which make up templates,
  97. ;    we give the type, the offset, and a description. For aspect templates, the offset is also the property #. 
  98. ;    
  99. ;    All templates include the following resource fork resources:
  100. ;
  101. ;     Type    Offset                        Description
  102. ;     ----    ------                        -----------
  103. ;    'rstr'    kDETTemplateName            Contains the name of the template
  104. ;
  105. ;
  106. kDETTemplateName                EQU        0
  107.  
  108. ;    Aspects, info-pages, and forwarders include the following as well:
  109. ;
  110. ;     Type    Offset                        Description
  111. ;     ----    ------                        -----------
  112. ;    'rstr'    kDETRecordType                Contains the type of record this applies to
  113. ;    'rstr'    kDETAttributeType            Contains the type of attribute this applies to
  114. ;    'detn'    kDETAttributeValueTag        Contains the tag of the attribute values this applies to
  115. ;
  116. ;
  117. kDETRecordType                    EQU        1
  118. kDETAttributeType                EQU        2
  119. kDETAttributeValueTag            EQU        3
  120.  
  121. ; ************************************ Aspects 
  122. ;    In the case of aspects, property numbers and resource id offsets are the same. Therefore, some of the following
  123. ;    defines are used for resource offsets, some are used for dynamically generated properties, and some are used for
  124. ;    both (i.e., properties which may be dynamically generated, but if they aren't, then they're taken from the
  125. ;    resource). Resource types are given in all cases below; even if there is no actual resource (for example in
  126. ;    the case of kDETAspectName), it indicates the type for the dynamically generated property. A resource type of
  127. ;    'rstr' corresponds to a property type of kDETPrTypeString; type 'detn' corresponds to kDETPrTypeNumber; and
  128. ;    'detb' corresponds to kDETPrTypeBinary.
  129. ;
  130. ;     Type    Offset                        Description
  131. ;     ----    ------                        -----------
  132. ;    'deta'    0                            Identifies the type of resource
  133. ;    'detc'    kDETCode                    Is the code resource, if any is used
  134. ;    'ICN#'    kDETAspectMainBitmap
  135. ;    'icl8'    kDETAspectMainBitmap
  136. ;    'icl4'    kDETAspectMainBitmap
  137. ;    'ics#'    kDETAspectMainBitmap
  138. ;    'ics8'    kDETAspectMainBitmap
  139. ;    'ics4'    kDETAspectMainBitmap
  140. ;    'sicn'    kDETAspectMainBitmap        Is the icon suite to display for this item type (main aspect only)
  141. ;    'rstr'    kDETAspectName                Contains the name of the item (attribute main aspect only)
  142. ;    'rst#'    kDETAspectCategory            Contains the internal categories for the record type (main aspect only)
  143. ;    'rst#'    kDETAspectExternalCategory    Contains the external (user-visible) names which correspond to the categories in
  144. ;                                        kDETAspectCategory; if this resource is not present, external names are taken from
  145. ;                                        another template; if no other template provides an external name for a given internal
  146. ;                                        category, the internal name is used as the external name (main aspect only)
  147. ;    'rstr'    kDETAspectKind                Is the item kind to display (main aspect only)
  148. ;    'detn'    kDETAspectGender            Is the gender of this kind of object for internationalization (main aspect only)
  149. ;    'rstr'    kDETAspectWhatIs            Is the string for balloon help when item is in sublist (main aspect only)
  150. ;    'rstr'    kDETAspectAliasKind            Is the item kind to display for aliases to this type of item (main aspect only)
  151. ;    'detn'    kDETAspectAliasGender        Is the gender of an alias to this kind of object for internationalization (main aspect only)
  152. ;    'rstr'    kDETAspectAliasWhatIs        Is the string for balloon help when an alias to the item is in sublist (main aspect only)
  153. ;    'rst#'    kDETAspectBalloons            Is a list of strings for balloon help; for each item in an info-page, it's
  154. ;                                        property # times 2 is used as an index into this array; if the item is not editable,
  155. ;                                        then the property # times 2 plus 1 is used
  156. ;    'rstr'    kDETAspectNewMenuName        Is the string to be used for the user to select new item creation; for records, the
  157. ;                                        string is used as a menu entry in the Catalogs menu; for attributes, the string
  158. ;                                        is used in a selection dialog invoked by an "Add..." button
  159. ;    'rstr'    kDETAspectNewEntryName        Is the name to be used for new records (with a digit appended if not unique)
  160. ;    'detb'    kDETAspectNewValue            Is the value to use when creating a new attribute value; the first four bytes
  161. ;                                        is the tag; the rest is the attribute value contents
  162. ;    'detn'    kDETAspectSublistOpenOnNew    If true (non-zero), automatically open newly created entries (property can be set
  163. ;                                        from a code resource, or via a default value in a resource)
  164. ;    'dett'    kDETAspectLookup            Is the attribute-to-property translation table
  165. ;    'rstr'    kDETAspectDragInString        Is a string describing the action of dragging into this aspect (if any)
  166. ;    'rstr'    kDETAspectDragInVerb        Is a single, short word that's the verb of the action (like "add" or "drop"; if
  167. ;                                        there's any doubt, use "OK")
  168. ;    'rstr'    kDETAspectDragInSummary        Is a short phrase that describes the action, suitable to be included in a selection list
  169. ;    'rst#'    kDETAspectRecordDragIn        Is a list of type pairs; in each pair, the first is the type of a record which
  170. ;                                        can be dragged into this aspect, and the second is the attribute type to store
  171. ;                                        the reference in
  172. ;    'rst#'    kDETAspectRecordCatDragIn    Is a list of category/attribute type pairs; in each pair, the first is the
  173. ;                                        category of records which can be dragged in, and the second is the type of
  174. ;                                        attribute to place the alias in
  175. ;    'rst#'    kDETAspectAttrDragIn        Is a list of type triples; in each triple, the first is the record type which can be
  176. ;                                        dragged from (or "" for any), the second is the attribute type which can be dragged
  177. ;                                        in, and the third is the attribute type to store the new attribute in
  178. ;    'rst#'    kDETAspectDragOut            Is a list of attribute types which can be dragged out of this aspect (an 'rst#'
  179. ;                                        resource with no entries means nothing can be dragged out; no 'rst#' resource means
  180. ;                                        everything can be dragged out)
  181. ;    'detm'    kDETAspectViewMenu            Is a table to fill in the view menu from
  182. ;    'detp'    kDETAspectReverseSort        Is a table listing which properties to sort in reverse order
  183. ;    'detw'    kDETAspectInfoPageCustomWindow    Is a specification of a custom window size/placement & whether to use the
  184. ;                                            page-selector (main aspect only)
  185. ;    'detv'    kDETAspectInfoPageCustomWindow    Is a view list which is common to all info-pages (main aspect only)
  186. ;
  187. kDETAspectCode                    EQU        4
  188. kDETAspectMainBitmap            EQU        5
  189. kDETAspectName                    EQU        6
  190. kDETAspectCategory                EQU        7
  191. kDETAspectExternalCategory        EQU        8
  192. kDETAspectKind                    EQU        9
  193. kDETAspectGender                EQU        10
  194. kDETAspectWhatIs                EQU        11
  195. kDETAspectAliasKind                EQU        12
  196. kDETAspectAliasGender            EQU        13
  197. kDETAspectAliasWhatIs            EQU        14
  198. kDETAspectBalloons                EQU        15
  199. kDETAspectNewMenuName            EQU        16
  200. kDETAspectNewEntryName            EQU        17
  201. kDETAspectNewValue                EQU        18
  202. kDETAspectSublistOpenOnNew        EQU        19
  203. kDETAspectLookup                EQU        20
  204. kDETAspectDragInString            EQU        21
  205. kDETAspectDragInVerb            EQU        22
  206. kDETAspectDragInSummary            EQU        23
  207. kDETAspectRecordDragIn            EQU        24
  208. kDETAspectRecordCatDragIn        EQU        25
  209. kDETAspectAttrDragIn            EQU        26
  210. kDETAspectAttrDragOut            EQU        27
  211. kDETAspectViewMenu                EQU        28
  212. kDETAspectReverseSort            EQU        29
  213. kDETAspectInfoPageCustomWindow    EQU        30
  214.  
  215. ; Properties: 
  216. kDETNoProperty                    EQU        -1
  217.  
  218. ; Each aspect has 250 attribute properties in this range: 
  219. kDETFirstLocalProperty            EQU        0
  220. kDETLastLocalProperty            EQU        (kDETFirstLocalProperty + 249)
  221.  
  222. ; Developers should use property numbers starting at this point: 
  223. kDETFirstDevProperty            EQU        40
  224.  
  225. ; The following range provides constant numeric properties for use in patterns and comparisons (constant n is
  226. ;  
  227. ;   given by kDETFirstConstantProperty+n): 
  228. kDETFirstConstantProperty        EQU        250
  229. kDETLastConstantProperty        EQU        (kDETFirstConstantProperty + 249)
  230.  
  231. ; To convert a number into a constant property, add this: 
  232. kDETConstantProperty            EQU        kDETFirstConstantProperty
  233. kDETZeroProperty                EQU        (kDETConstantProperty + 0)
  234. kDETOneProperty                    EQU        (kDETConstantProperty + 1)
  235. kDETFalseProperty                EQU        (kDETConstantProperty + 0)
  236. kDETTrueProperty                EQU        (kDETConstantProperty + 1)
  237.  
  238. ; The following apply to records, attributes, or aliases; they are the name and kind, as they appear in icon lists: 
  239. kDETPrName                        EQU        3050
  240. kDETPrKind                        EQU        3051
  241.  
  242. ; Access mask properties: 
  243. kDETDNodeAccessMask                EQU        25825                ; The DNode access mask 
  244. kDETRecordAccessMask            EQU        25826                ; The record access mask 
  245. kDETAttributeAccessMask            EQU        25827                ; The attribute access mask 
  246. kDETPrimaryMaskByBit            EQU        25828                ; A set of sixteen properties to access all bits of the primary mask 
  247.  
  248. ; See AOCE documentation for details definitions of each of these bits: 
  249. kDETPrimarySeeMask                EQU        kDETPrimaryMaskByBit
  250. kDETPrimaryAddMask                EQU        (kDETPrimaryMaskByBit + 1)
  251. kDETPrimaryDeleteMask            EQU        (kDETPrimaryMaskByBit + 2)
  252. kDETPrimaryChangeMask            EQU        (kDETPrimaryMaskByBit + 3)
  253. kDETPrimaryRenameMask            EQU        (kDETPrimaryMaskByBit + 4)
  254. kDETPrimaryChangePrivsMask        EQU        (kDETPrimaryMaskByBit + 5)
  255. kDETPrimaryTopMaskBit            EQU        (kDETPrimaryMaskByBit + 15)
  256.  
  257. ; The following property is zero until we've completed the first catalog lookup; from then on it's 1 
  258. kDETPastFirstLookup                EQU        26550
  259.  
  260. ; The following property is the page number; issuing a property command with this property will flip info-pages 
  261. kDETInfoPageNumber                EQU        27050
  262.  
  263. ; The value of the following properties contains the template number of the targeted aspect's template, and the
  264. ;   currently open info-page (if any). These values can be used with kDETAspectTemplate and kDETInfoPageTemplate
  265. ;   target selectors. 
  266. kDETAspectTemplateNumber        EQU        26551
  267. kDETInfoPageTemplateNumber        EQU        26552
  268.  
  269. ; Properties for property commands to deal with sublist items: 
  270. kDETOpenSelectedItems            EQU        26553                ; Open selected sublist items 
  271. kDETAddNewItem                    EQU        26554                ; Add new sublist item 
  272. kDETRemoveSelectedItems            EQU        26555                ; Remove selected sublist items 
  273.  
  274. ; Property types are used to specify types of properties and conversions between types (zero and negative numbers
  275. ;   are reserved for Apple; developer code resources can use positive numbers): 
  276. kDETPrTypeNumber                EQU        -1                    ; A number 
  277. kDETPrTypeString                EQU        -2                    ; A string 
  278. kDETPrTypeBinary                EQU        -3                    ; A binary block 
  279.  
  280. ; ************************************ Info-pages 
  281. ; Info-pages include the following as well:
  282. ;
  283. ;     Type    Offset                        Description
  284. ;     ----    ------                        -----------
  285. ;    'deti'    0                            Identifies the type of resource; see below for details on the contents
  286. ;    'rstr'    kDETInfoPageName            Is the name of the view to use in the page selection pop-up
  287. ;    'rstr'    kDETInfoPageMainViewAspect    Is the name of the aspect to use with the main page view
  288. ;    'rstr'    kDETInfoPageMenuName        Is the name of the catalogs menu ("Catalogs" if not present)
  289. ;    'detm'    kDETInfoPageMenuEntries        Are menu entries to go in the Catalogs menu
  290. ;
  291. ;
  292. kDETInfoPageName                EQU        4
  293. kDETInfoPageMainViewAspect        EQU        5
  294. kDETInfoPageMenuName            EQU        6
  295. kDETInfoPageMenuEntries            EQU        7
  296.  
  297. ; ************************************ Views 
  298. ;
  299. ;   Flags: 
  300. kDETNoFlags                        EQU        0
  301. ; Main view (non-sublist) field enabled 
  302. kDETEnabled                        EQU        (1 << 0)
  303.  
  304. ; The following flags make sense for items in a sublist only 
  305. ; Hilight view when entry is selected 
  306. kDETHilightIfSelected            EQU        (1 << 0)
  307.  
  308. ; The following flags make sense for text views only 
  309. kDETNumericOnly                    EQU        (1 << 3)            ; Only allow the user to enter digits 
  310. kDETMultiLine                    EQU        (1 << 4)            ; Allow multiple lines in view 
  311. kDETDynamicSize                    EQU        (1 << 9)            ; Don't draw box around text until user clicks in it, then auto-size it
  312. ;     * Don't allow the user to enter colons (convert ":"s to "-"s) 
  313. kDETAllowNoColons                EQU        (1 << 10)
  314.  
  315. ; The following flags are used for pop-up menus only 
  316. ; Automatically resize pop-up based on contents 
  317. kDETPopupDynamicSize            EQU        (1 << 8)
  318.  
  319. ; The following flags are used for EditPicture views only 
  320. ; Scale picture to view bounds rather than cropping 
  321. kDETScaleToView                    EQU        (1 << 8)
  322.  
  323. ;    Sizes for icons 
  324. kDETLargeIcon                    EQU        0
  325. kDETSmallIcon                    EQU        1
  326. kDETMiniIcon                    EQU        2
  327.  
  328. ; Stolen from TextEdit.h 
  329. kDETLeft                        EQU        0
  330. kDETCenter                        EQU        1
  331. kDETRight                        EQU        -1
  332. kDETForceLeft                    EQU        -2
  333.  
  334. ; Flags for use within Box view type attributes - these are distinct from the flags above 
  335. kDETUnused                        EQU        0
  336. kDETBoxTakesContentClicks        EQU        (1 << 0)
  337. kDETBoxIsRounded                EQU        (1 << 1)
  338. kDETBoxIsGrayed                    EQU        (1 << 2)
  339. kDETBoxIsInvisible                EQU        (1 << 3)
  340.  
  341. ; The common font info 
  342. kDETApplicationFont                EQU        1
  343. kDETApplicationFontSize            EQU        9
  344. kDETAppFontLineHeight            EQU        12
  345. kDETSystemFont                    EQU        0
  346. kDETSystemFontSize                EQU        12
  347. kDETSystemFontLineHeight        EQU        16
  348. kDETDefaultFont                    EQU        1
  349. kDETDefaultFontSize                EQU        9
  350. kDETDefaultFontLineHeight        EQU        12
  351.  
  352. ;    These were taken from QuickDraw.h (where they're enums and therefore unusable in resource definitions): 
  353. kDETNormal                        EQU        0
  354. kDETBold                        EQU        1
  355. kDETItalic                        EQU        2
  356. kDETUnderline                    EQU        4
  357. kDETOutline                        EQU        8
  358. kDETShadow                        EQU        $10
  359. kDETCondense                    EQU        $20
  360. kDETExtend                        EQU        $40
  361.  
  362. kDETIconStyle                    EQU        -3                    ; Normal text style for regular sublist entries, italic text style for aliases 
  363.  
  364. ; View menu: 
  365. kDETChangeViewCommand            EQU        'view'
  366.  
  367. ; Info-page window sizes: 
  368. ; Default record info-pages: 
  369. kDETRecordInfoWindHeight        EQU        228
  370. kDETRecordInfoWindWidth            EQU        400
  371.  
  372. ; Default attribute info-pages: 
  373. kDETAttributeInfoWindHeight        EQU        250
  374. kDETAttributeInfoWindWidth        EQU        230
  375.  
  376. ; Page identifying icon (for default info-page layout): 
  377. kDETSubpageIconTop                EQU        8
  378. kDETSubpageIconLeft                EQU        8
  379. kDETSubpageIconBottom            EQU        (kDETSubpageIconTop + 32)
  380. kDETSubpageIconRight            EQU        (kDETSubpageIconLeft + 32)
  381.  
  382. ; ************************************ Killers 
  383. ;
  384. ;   Killers include the following as well:
  385. ;
  386. ;     Type    Offset                        Description
  387. ;     ----    ------                        -----------
  388. ;    'detk'    0                            Identifies the type of resource; see below for details on the contents
  389. ;    'rst#'    kDETKillerName                Contains a list of template names to be killed
  390. ;
  391. ;
  392. kDETKillerName                    EQU        1
  393.  
  394. ; ************************************ Forwarders 
  395. ;
  396. ;   Forwarders include the following as well:
  397. ;
  398. ;     Type    Offset                        Description
  399. ;     ----    ------                        -----------
  400. ;    'detf'    0                            Identifies the type of resource; see below for details on the contents
  401. ;    'rst#'    kDETForwarderTemplateNames    Contains a list of names of templates to forward to
  402. ;
  403. ;
  404. kDETForwarderTemplateNames        EQU        4
  405.  
  406. ; Target specification: 
  407. kDETSelf                        EQU        0                    ; The "current" item 
  408. kDETSelfOtherAspect                EQU        1                    ; Another aspect of the current item 
  409. kDETParent                        EQU        2                    ; The parent (i.e., the aspect we're in the sublist of, if any) of the current item 
  410. kDETSublistItem                    EQU        3                    ; The itemNumberth item in the sublist 
  411. kDETSelectedSublistItem            EQU        4                    ; The itemNumberth selected item in the sublist 
  412. kDETDSSpec                        EQU        5                    ; The item specified by the packed DSSpec 
  413. kDETAspectTemplate                EQU        6                    ; A specific aspect template (number itemNumber) 
  414. kDETInfoPageTemplate            EQU        7                    ; A specific info-page template (number itemNumber)
  415. ;    *  Force type to be short 
  416. kDETHighSelector                EQU        $F000
  417.  
  418. ; typedef long                 DETTargetSelector
  419. DETTargetSpecification     RECORD    0
  420. selector                 ds.l   1        ; offset: $0 (0)        ; Target selection method (see above) 
  421. aspectName                 ds.l   1        ; offset: $4 (4)        ; The name of the aspect (kDETSelfOtherAspect, kDETSublistItem,
  422. ;                                           kDETSelectedSublistItem, kDETDSSpec); nil for main aspect or none;
  423. ;                                           always filled in for calls if there is an aspect, even if it's the main aspect 
  424. itemNumber                 ds.l   1        ; offset: $8 (8)        ; Sublist index (kDETSublistItem & kDETSelectedSublistItem & kDETAspectTemplate);
  425. ;                                           1-based indexing 
  426. dsSpec                     ds.l   1        ; offset: $C (12)        ; DSSpec (kDETDSSpec only) 
  427. sizeof                     EQU *            ; size:   $10 (16)
  428.                         ENDR
  429.  
  430. ; typedef struct DETTargetSpecification  DETTargetSpecification
  431. ; Code resource calls and call-backs both return an OSType:
  432. ;        kDETDidNotHandle (1)    = used by template to say "I didn't handle it" (for calls only)
  433. ;        noErr                    = function completed successfully
  434. ;        any error                = function failed, and here's why
  435. ;
  436.     kDETDidNotHandle: SET 1
  437.  
  438. kDETcmdSimpleCallback            EQU        0
  439. kDETcmdBeep                        EQU        1
  440. kDETcmdBusy                        EQU        2
  441. kDETcmdChangeCallFors            EQU        3
  442. kDETcmdGetCommandSelectionCount    EQU        4
  443. kDETcmdGetCommandItemN            EQU        5
  444. kDETcmdOpenDSSpec                EQU        6
  445. kDETcmdAboutToTalk                EQU        7
  446. kDETcmdUnloadTemplates            EQU        8
  447. kDETcmdTemplateCounts            EQU        9
  448. kDETcmdTargetedCallback            EQU        1000
  449. kDETcmdGetDSSpec                EQU        1001
  450. kDETcmdSublistCount                EQU        1002
  451. kDETcmdSelectedSublistCount        EQU        1003
  452. kDETcmdRequestSync                EQU        1004
  453. kDETcmdBreakAttribute            EQU        1005
  454. kDETcmdGetTemplateFSSpec        EQU        1006
  455. kDETcmdGetOpenEdit                EQU        1007
  456. kDETcmdCloseEdit                EQU        1008
  457. kDETcmdPropertyCallback            EQU        2000
  458. kDETcmdGetPropertyType            EQU        2001
  459. kDETcmdGetPropertyNumber        EQU        2002
  460. kDETcmdGetPropertyRString        EQU        2003
  461. kDETcmdGetPropertyBinarySize    EQU        2004
  462. kDETcmdGetPropertyBinary        EQU        2005
  463. kDETcmdGetPropertyChanged        EQU        2006
  464. kDETcmdGetPropertyEditable        EQU        2007
  465. kDETcmdSetPropertyType            EQU        2008
  466. kDETcmdSetPropertyNumber        EQU        2009
  467. kDETcmdSetPropertyRString        EQU        2010
  468. kDETcmdSetPropertyBinary        EQU        2011
  469. kDETcmdSetPropertyChanged        EQU        2012
  470. kDETcmdSetPropertyEditable        EQU        2013
  471. kDETcmdDirtyProperty            EQU        2014
  472. kDETcmdDoPropertyCommand        EQU        2015
  473. kDETcmdAddMenu                    EQU        2016
  474. kDETcmdRemoveMenu                EQU        2017
  475. kDETcmdMenuItemRString            EQU        2018
  476. kDETcmdSaveProperty                EQU        2019
  477. kDETcmdGetCustomViewUserReference EQU        2020
  478. kDETcmdGetCustomViewBounds        EQU        2021
  479. kDETcmdGetResource                EQU        2022
  480. ; Force type to be long 
  481. kDETcmdHighCallback                EQU        $F0000000
  482.  
  483. ; typedef unsigned long     DETCallBackFunctions
  484. DETProtoCallBackBlock     RECORD    0
  485. reqFunction                 ds.l   1        ; offset: $0 (0)
  486. target                     ds.l   4        ; offset: $4 (4)
  487. property                 ds.w   1        ; offset: $14 (20)
  488. sizeof                     EQU *            ; size:   $16 (22)
  489.                         ENDR
  490.  
  491. ; typedef struct DETProtoCallBackBlock  DETProtoCallBackBlock
  492. DETBeepBlock             RECORD    0
  493. reqFunction                 ds.l   1        ; offset: $0 (0)
  494. sizeof                     EQU *            ; size:   $4 (4)
  495.                         ENDR
  496.  
  497. ; typedef struct DETBeepBlock  DETBeepBlock
  498. DETBusyBlock             RECORD    0
  499. reqFunction                 ds.l   1        ; offset: $0 (0)
  500. sizeof                     EQU *            ; size:   $4 (4)
  501.                         ENDR
  502.  
  503. ; typedef struct DETBusyBlock  DETBusyBlock
  504. DETChangeCallForsBlock     RECORD    0
  505. reqFunction                 ds.l   1        ; offset: $0 (0)
  506. target                     ds.l   4        ; offset: $4 (4)
  507. newCallFors                 ds.l   1        ; offset: $14 (20)        ;  -> New call-for mask 
  508. sizeof                     EQU *            ; size:   $18 (24)
  509.                         ENDR
  510.  
  511. ; typedef struct DETChangeCallForsBlock  DETChangeCallForsBlock
  512. DETGetCommandSelectionCountBlock RECORD    0
  513. reqFunction                 ds.l   1        ; offset: $0 (0)
  514. count                     ds.l   1        ; offset: $4 (4)        ; <-  The number of items in the command selection list 
  515. sizeof                     EQU *            ; size:   $8 (8)
  516.                         ENDR
  517.  
  518. ; typedef struct DETGetCommandSelectionCountBlock  DETGetCommandSelectionCountBlock
  519.  
  520. kDETHFSType                        EQU        0                    ; HFS item type 
  521. kDETDSType                        EQU        1                    ; Catalog Service item type 
  522. kDETMailType                    EQU        2                    ; Mail (letter) item type 
  523. kDETMoverType                    EQU        3                    ; Sounds, fonts, etc., from inside a suitcase or system file 
  524. kDETLastItemType                EQU        $F0000000            ; Force it to be a long (C & C++ seem to disagree about the definition of 0xF000) 
  525.  
  526. ; typedef unsigned long     DETItemType
  527. ; FSSpec plus possibly interesting additional info 
  528. DETFSInfo                 RECORD    0
  529. fileType                 ds.l   1        ; offset: $0 (0)        ; File type 
  530. fileCreator                 ds.l   1        ; offset: $4 (4)        ; File creator 
  531. fdFlags                     ds.w   1        ; offset: $8 (8)        ; Finder flags 
  532. fsSpec                     ds     FSSpec    ; offset: $A (10)        ; FSSpec 
  533. sizeof                     EQU *            ; size:   $50 (80)
  534.                         ENDR
  535.  
  536. ; typedef struct DETFSInfo     DETFSInfo
  537. DSRec                     RECORD    0
  538. dsSpec                     ds.l   1        ; offset: $0 (0)        ; <-  DSSpec for item (caller must DisposHandle() when done) 
  539. refNum                     ds.w   1        ; offset: $4 (4)        ; <-  Refnum for returned address 
  540. identity                 ds.l   1        ; offset: $6 (6)        ; <-  Identity for returned address 
  541. sizeof                     EQU *            ; size:   $A (10)
  542.                         ENDR
  543.  
  544. ; typedef struct DSRec         DSRec
  545. ; typedef DETFSInfo         *DETFSInfoPtr
  546. ; typedef LetterSpec         *LetterSpecPtr
  547. ItemRec                 RECORD    0
  548. fsInfo                     ds.l   1        ; offset: $0 (0)        ; <-  FSSpec & info for item (caller must DisposHandle() when done) 
  549.                          ORG 0
  550. asmDS                     ds.w   5        ; offset: $0 (0)
  551.                          ORG 0
  552. dsSpec                     ds.l   1        ; offset: $0 (0)        ; <-  DSSpec for item (caller must DisposHandle() when done) 
  553.                          ORG 0
  554. ltrSpec                     ds.l   1        ; offset: $0 (0)        ; <-  Letter spec for item (caller must DisposHandle() when done) 
  555.                          ORG 10
  556. sizeof                     EQU *            ; size:   $A (10)
  557.                         ENDR
  558.  
  559. DETGetCommandItemNBlock RECORD    0
  560. reqFunction                 ds.l   1        ; offset: $0 (0)
  561. itemNumber                 ds.l   1        ; offset: $4 (4)        ;  -> Item number to retrieve (1-based) 
  562. itemType                 ds.l   1        ; offset: $8 (8)        ;  -> Type of item to be returned (if we can interpret it as such) 
  563. item                     ds.w   5        ; offset: $C (12)
  564. sizeof                     EQU *            ; size:   $16 (22)
  565.                         ENDR
  566.  
  567. ; typedef struct DETGetCommandItemNBlock  DETGetCommandItemNBlock
  568. DETGetDSSpecBlock         RECORD    0
  569. reqFunction                 ds.l   1        ; offset: $0 (0)
  570. target                     ds.l   4        ; offset: $4 (4)
  571. dsSpec                     ds.l   1        ; offset: $14 (20)        ; <-  Handle with result (caller must DisposHandle() when done) 
  572. refNum                     ds.w   1        ; offset: $18 (24)        ; <-  Refnum for address if PD 
  573. identity                 ds.l   1        ; offset: $1A (26)        ; <-  Identity for address 
  574. isAlias                     ds.b   1        ; offset: $1E (30)        ; <-  True if this entry is an alias 
  575. isRecordRef                 ds.b   1        ; offset: $1F (31)        ; <-  True if this entry is a record reference (reserved) 
  576. sizeof                     EQU *            ; size:   $20 (32)
  577.                         ENDR
  578.  
  579. ; typedef struct DETGetDSSpecBlock  DETGetDSSpecBlock
  580. DETGetTemplateFSSpecBlock RECORD    0
  581. reqFunction                 ds.l   1        ; offset: $0 (0)
  582. target                     ds.l   4        ; offset: $4 (4)
  583. fsSpec                     ds     FSSpec    ; offset: $14 (20)        ; <-  FSSpec of template file 
  584. baseID                     ds.w   1        ; offset: $5A (90)        ; <-  Base ID of this template 
  585. aspectTemplateNumber     ds.l   1        ; offset: $5C (92)        ; <-  The template number for this aspect template 
  586. sizeof                     EQU *            ; size:   $60 (96)
  587.                         ENDR
  588.  
  589. ; typedef struct DETGetTemplateFSSpecBlock  DETGetTemplateFSSpecBlock
  590. DETGetOpenEditBlock     RECORD    0
  591. reqFunction                 ds.l   1        ; offset: $0 (0)
  592. target                     ds.l   4        ; offset: $4 (4)
  593. viewProperty             ds.w   1        ; offset: $14 (20)        ; <-  The property of the view being edited (or kNoProperty if none) 
  594. sizeof                     EQU *            ; size:   $16 (22)
  595.                         ENDR
  596.  
  597. ; typedef struct DETGetOpenEditBlock  DETGetOpenEditBlock
  598. DETCloseEditBlock         RECORD    0
  599. reqFunction                 ds.l   1        ; offset: $0 (0)
  600. target                     ds.l   4        ; offset: $4 (4)
  601. sizeof                     EQU *            ; size:   $14 (20)
  602.                         ENDR
  603.  
  604. ; typedef struct DETCloseEditBlock  DETCloseEditBlock
  605. DETGetPropertyTypeBlock RECORD    0
  606. reqFunction                 ds.l   1        ; offset: $0 (0)
  607. target                     ds.l   4        ; offset: $4 (4)
  608. property                 ds.w   1        ; offset: $14 (20)
  609. propertyType             ds.w   1        ; offset: $16 (22)        ; <-  The type of the property 
  610. sizeof                     EQU *            ; size:   $18 (24)
  611.                         ENDR
  612.  
  613. ; typedef struct DETGetPropertyTypeBlock  DETGetPropertyTypeBlock
  614. DETGetPropertyNumberBlock RECORD    0
  615. reqFunction                 ds.l   1        ; offset: $0 (0)
  616. target                     ds.l   4        ; offset: $4 (4)
  617. property                 ds.w   1        ; offset: $14 (20)
  618. propertyValue             ds.l   1        ; offset: $16 (22)        ; <-  The value of the property 
  619. sizeof                     EQU *            ; size:   $1A (26)
  620.                         ENDR
  621.  
  622. ; typedef struct DETGetPropertyNumberBlock  DETGetPropertyNumberBlock
  623. DETGetPropertyRStringBlock RECORD    0
  624. reqFunction                 ds.l   1        ; offset: $0 (0)
  625. target                     ds.l   4        ; offset: $4 (4)
  626. property                 ds.w   1        ; offset: $14 (20)
  627. propertyValue             ds.l   1        ; offset: $16 (22)        ; <-  A handle containing the property (as an RString) (caller must DisposHandle() when done) 
  628. sizeof                     EQU *            ; size:   $1A (26)
  629.                         ENDR
  630.  
  631. ; typedef struct DETGetPropertyRStringBlock  DETGetPropertyRStringBlock
  632. DETGetPropertyBinarySizeBlock RECORD    0
  633. reqFunction                 ds.l   1        ; offset: $0 (0)
  634. target                     ds.l   4        ; offset: $4 (4)
  635. property                 ds.w   1        ; offset: $14 (20)
  636. propertyBinarySize         ds.l   1        ; offset: $16 (22)        ; <-  The size of the property as a binary block 
  637. sizeof                     EQU *            ; size:   $1A (26)
  638.                         ENDR
  639.  
  640. ; typedef struct DETGetPropertyBinarySizeBlock  DETGetPropertyBinarySizeBlock
  641. DETGetPropertyBinaryBlock RECORD    0
  642. reqFunction                 ds.l   1        ; offset: $0 (0)
  643. target                     ds.l   4        ; offset: $4 (4)
  644. property                 ds.w   1        ; offset: $14 (20)
  645. propertyValue             ds.l   1        ; offset: $16 (22)        ; <-  Handle with the value of the property (caller must DisposHandle() when done) 
  646. sizeof                     EQU *            ; size:   $1A (26)
  647.                         ENDR
  648.  
  649. ; typedef struct DETGetPropertyBinaryBlock  DETGetPropertyBinaryBlock
  650. DETGetPropertyChangedBlock RECORD    0
  651. reqFunction                 ds.l   1        ; offset: $0 (0)
  652. target                     ds.l   4        ; offset: $4 (4)
  653. property                 ds.w   1        ; offset: $14 (20)
  654. propertyChanged             ds.b   1        ; offset: $16 (22)        ; <-  True if the property is marked as changed 
  655. filler1                     ds.b   1        ; offset: $17 (23)
  656. sizeof                     EQU *            ; size:   $18 (24)
  657.                         ENDR
  658.  
  659. ; typedef struct DETGetPropertyChangedBlock  DETGetPropertyChangedBlock
  660. DETGetPropertyEditableBlock RECORD    0
  661. reqFunction                 ds.l   1        ; offset: $0 (0)
  662. target                     ds.l   4        ; offset: $4 (4)
  663. property                 ds.w   1        ; offset: $14 (20)
  664. propertyEditable         ds.b   1        ; offset: $16 (22)        ; <-  True if the property can be edited by the user (if false, view will appear disabled) 
  665. filler1                     ds.b   1        ; offset: $17 (23)
  666. sizeof                     EQU *            ; size:   $18 (24)
  667.                         ENDR
  668.  
  669. ; typedef struct DETGetPropertyEditableBlock  DETGetPropertyEditableBlock
  670. DETSetPropertyTypeBlock RECORD    0
  671. reqFunction                 ds.l   1        ; offset: $0 (0)
  672. target                     ds.l   4        ; offset: $4 (4)
  673. property                 ds.w   1        ; offset: $14 (20)
  674. newType                     ds.w   1        ; offset: $16 (22)        ;  -> New type for property (just sets type, does not convert contents) 
  675. sizeof                     EQU *            ; size:   $18 (24)
  676.                         ENDR
  677.  
  678. ; typedef struct DETSetPropertyTypeBlock  DETSetPropertyTypeBlock
  679. DETSetPropertyNumberBlock RECORD    0
  680. reqFunction                 ds.l   1        ; offset: $0 (0)
  681. target                     ds.l   4        ; offset: $4 (4)
  682. property                 ds.w   1        ; offset: $14 (20)
  683. newValue                 ds.l   1        ; offset: $16 (22)        ;  -> New value to set property to (and set type to number) 
  684. sizeof                     EQU *            ; size:   $1A (26)
  685.                         ENDR
  686.  
  687. ; typedef struct DETSetPropertyNumberBlock  DETSetPropertyNumberBlock
  688. DETSetPropertyRStringBlock RECORD    0
  689. reqFunction                 ds.l   1        ; offset: $0 (0)
  690. target                     ds.l   4        ; offset: $4 (4)
  691. property                 ds.w   1        ; offset: $14 (20)
  692. newValue                 ds.l   1        ; offset: $16 (22)        ;  -> New value to set property to (and set type to RString) 
  693. sizeof                     EQU *            ; size:   $1A (26)
  694.                         ENDR
  695.  
  696. ; typedef struct DETSetPropertyRStringBlock  DETSetPropertyRStringBlock
  697. DETSetPropertyBinaryBlock RECORD    0
  698. reqFunction                 ds.l   1        ; offset: $0 (0)
  699. target                     ds.l   4        ; offset: $4 (4)
  700. property                 ds.w   1        ; offset: $14 (20)
  701. newValue                 ds.l   1        ; offset: $16 (22)        ;  -> New value to set property to (and set type to binary) 
  702. newValueSize             ds.l   1        ; offset: $1A (26)        ;  -> Size of new value 
  703. sizeof                     EQU *            ; size:   $1E (30)
  704.                         ENDR
  705.  
  706. ; typedef struct DETSetPropertyBinaryBlock  DETSetPropertyBinaryBlock
  707. DETSetPropertyChangedBlock RECORD    0
  708. reqFunction                 ds.l   1        ; offset: $0 (0)
  709. target                     ds.l   4        ; offset: $4 (4)
  710. property                 ds.w   1        ; offset: $14 (20)
  711. propertyChanged             ds.b   1        ; offset: $16 (22)        ;  -> Value to set changed flag on property to 
  712. filler1                     ds.b   1        ; offset: $17 (23)
  713. sizeof                     EQU *            ; size:   $18 (24)
  714.                         ENDR
  715.  
  716. ; typedef struct DETSetPropertyChangedBlock  DETSetPropertyChangedBlock
  717. DETSetPropertyEditableBlock RECORD    0
  718. reqFunction                 ds.l   1        ; offset: $0 (0)
  719. target                     ds.l   4        ; offset: $4 (4)
  720. property                 ds.w   1        ; offset: $14 (20)
  721. propertyEditable         ds.b   1        ; offset: $16 (22)        ;  -> Value to set editable flag on property to 
  722. filler1                     ds.b   1        ; offset: $17 (23)
  723. sizeof                     EQU *            ; size:   $18 (24)
  724.                         ENDR
  725.  
  726. ; typedef struct DETSetPropertyEditableBlock  DETSetPropertyEditableBlock
  727. DETDirtyPropertyBlock     RECORD    0
  728. reqFunction                 ds.l   1        ; offset: $0 (0)
  729. target                     ds.l   4        ; offset: $4 (4)
  730. property                 ds.w   1        ; offset: $14 (20)
  731. sizeof                     EQU *            ; size:   $16 (22)
  732.                         ENDR
  733.  
  734. ; typedef struct DETDirtyPropertyBlock  DETDirtyPropertyBlock
  735. DETDoPropertyCommandBlock RECORD    0
  736. reqFunction                 ds.l   1        ; offset: $0 (0)
  737. target                     ds.l   4        ; offset: $4 (4)
  738. property                 ds.w   1        ; offset: $14 (20)
  739. parameter                 ds.l   1        ; offset: $16 (22)        ; ->  Parameter of command 
  740. sizeof                     EQU *            ; size:   $1A (26)
  741.                         ENDR
  742.  
  743. ; typedef struct DETDoPropertyCommandBlock  DETDoPropertyCommandBlock
  744. DETSublistCountBlock     RECORD    0
  745. reqFunction                 ds.l   1        ; offset: $0 (0)
  746. target                     ds.l   4        ; offset: $4 (4)
  747. count                     ds.l   1        ; offset: $14 (20)        ; <-  The number of items in the current item's sublist 
  748. sizeof                     EQU *            ; size:   $18 (24)
  749.                         ENDR
  750.  
  751. ; typedef struct DETSublistCountBlock  DETSublistCountBlock
  752. DETSelectedSublistCountBlock RECORD    0
  753. reqFunction                 ds.l   1        ; offset: $0 (0)
  754. target                     ds.l   4        ; offset: $4 (4)
  755. count                     ds.l   1        ; offset: $14 (20)        ; <-  The number of selected items in the current item's sublist 
  756. sizeof                     EQU *            ; size:   $18 (24)
  757.                         ENDR
  758.  
  759. ; typedef struct DETSelectedSublistCountBlock  DETSelectedSublistCountBlock
  760. DETRequestSyncBlock     RECORD    0
  761. reqFunction                 ds.l   1        ; offset: $0 (0)
  762. target                     ds.l   4        ; offset: $4 (4)
  763. sizeof                     EQU *            ; size:   $14 (20)
  764.                         ENDR
  765.  
  766. ; typedef struct DETRequestSyncBlock  DETRequestSyncBlock
  767. DETAddMenuBlock         RECORD    0
  768. reqFunction                 ds.l   1        ; offset: $0 (0)
  769. target                     ds.l   4        ; offset: $4 (4)
  770. property                 ds.w   1        ; offset: $14 (20)
  771. name                     ds.l   1        ; offset: $16 (22)        ;  -> Name of new menu item 
  772. parameter                 ds.l   1        ; offset: $1A (26)        ;  -> Parameter to return when this item is selected 
  773. addAfter                 ds.l   1        ; offset: $1E (30)        ;  -> Parameter of entry to add after, or -1 for add at end 
  774. sizeof                     EQU *            ; size:   $22 (34)
  775.                         ENDR
  776.  
  777. ; typedef struct DETAddMenuBlock  DETAddMenuBlock
  778. DETRemoveMenuBlock         RECORD    0
  779. reqFunction                 ds.l   1        ; offset: $0 (0)
  780. target                     ds.l   4        ; offset: $4 (4)
  781. property                 ds.w   1        ; offset: $14 (20)
  782. itemToRemove             ds.l   1        ; offset: $16 (22)        ;  -> Parameter of menu item to remove 
  783. sizeof                     EQU *            ; size:   $1A (26)
  784.                         ENDR
  785.  
  786. ; typedef struct DETRemoveMenuBlock  DETRemoveMenuBlock
  787. DETMenuItemRStringBlock RECORD    0
  788. reqFunction                 ds.l   1        ; offset: $0 (0)
  789. target                     ds.l   4        ; offset: $4 (4)
  790. property                 ds.w   1        ; offset: $14 (20)
  791. itemParameter             ds.l   1        ; offset: $16 (22)        ;  -> Parameter of menu item to return string for 
  792. rString                     ds.l   1        ; offset: $1A (26)        ; <-  Handle with the RString (caller must DisposHandle() when done) 
  793. sizeof                     EQU *            ; size:   $1E (30)
  794.                         ENDR
  795.  
  796. ; typedef struct DETMenuItemRStringBlock  DETMenuItemRStringBlock
  797. DETOpenDSSpecBlock         RECORD    0
  798. reqFunction                 ds.l   1        ; offset: $0 (0)
  799. dsSpec                     ds.l   1        ; offset: $4 (4)        ;  -> DSSpec of object to be opened 
  800. sizeof                     EQU *            ; size:   $8 (8)
  801.                         ENDR
  802.  
  803. ; typedef struct DETOpenDSSpecBlock  DETOpenDSSpecBlock
  804. DETAboutToTalkBlock     RECORD    0
  805. reqFunction                 ds.l   1        ; offset: $0 (0)
  806. sizeof                     EQU *            ; size:   $4 (4)
  807.                         ENDR
  808.  
  809. ; typedef struct DETAboutToTalkBlock  DETAboutToTalkBlock
  810. DETBreakAttributeBlock     RECORD    0
  811. reqFunction                 ds.l   1        ; offset: $0 (0)
  812. target                     ds.l   4        ; offset: $4 (4)
  813. breakAttribute             ds.l   1        ; offset: $14 (20)        ;  -> Attribute to parse 
  814. isChangeable             ds.b   1        ; offset: $18 (24)        ;  -> True if the value can be changed by the user 
  815. filler1                     ds.b   1        ; offset: $19 (25)
  816. sizeof                     EQU *            ; size:   $1A (26)
  817.                         ENDR
  818.  
  819. ; typedef struct DETBreakAttributeBlock  DETBreakAttributeBlock
  820. DETSavePropertyBlock     RECORD    0
  821. reqFunction                 ds.l   1        ; offset: $0 (0)
  822. target                     ds.l   4        ; offset: $4 (4)
  823. property                 ds.w   1        ; offset: $14 (20)
  824. sizeof                     EQU *            ; size:   $16 (22)
  825.                         ENDR
  826.  
  827. ; typedef struct DETSavePropertyBlock  DETSavePropertyBlock
  828. DETGetCustomViewUserReferenceBlock RECORD    0
  829. reqFunction                 ds.l   1        ; offset: $0 (0)
  830. target                     ds.l   4        ; offset: $4 (4)
  831. property                 ds.w   1        ; offset: $14 (20)
  832. userReference             ds.w   1        ; offset: $16 (22)        ; <-  User reference value, as specified in the .r file 
  833. sizeof                     EQU *            ; size:   $18 (24)
  834.                         ENDR
  835.  
  836. ; typedef struct DETGetCustomViewUserReferenceBlock  DETGetCustomViewUserReferenceBlock
  837. DETGetCustomViewBoundsBlock RECORD    0
  838. reqFunction                 ds.l   1        ; offset: $0 (0)
  839. target                     ds.l   4        ; offset: $4 (4)
  840. property                 ds.w   1        ; offset: $14 (20)
  841. bounds                     ds     Rect    ; offset: $16 (22)        ; <-  Bounds of the view 
  842. sizeof                     EQU *            ; size:   $1E (30)
  843.                         ENDR
  844.  
  845. ; typedef struct DETGetCustomViewBoundsBlock  DETGetCustomViewBoundsBlock
  846. DETGetResourceBlock     RECORD    0
  847. reqFunction                 ds.l   1        ; offset: $0 (0)
  848. target                     ds.l   4        ; offset: $4 (4)
  849. property                 ds.w   1        ; offset: $14 (20)
  850. resourceType             ds.l   1        ; offset: $16 (22)        ;  -> Resource type 
  851. theResource                 ds.l   1        ; offset: $1A (26)        ; <-  The resource handle (caller must dispose when done) 
  852. sizeof                     EQU *            ; size:   $1E (30)
  853.                         ENDR
  854.  
  855. ; typedef struct DETGetResourceBlock  DETGetResourceBlock
  856. DETTemplateCounts         RECORD    0
  857. reqFunction                 ds.l   1        ; offset: $0 (0)
  858. aspectTemplateCount         ds.l   1        ; offset: $4 (4)        ; <-  Number of aspect templates in the system 
  859. infoPageTemplateCount     ds.l   1        ; offset: $8 (8)        ; <-  Number of info-page templates in the system 
  860. sizeof                     EQU *            ; size:   $C (12)
  861.                         ENDR
  862.  
  863. ; typedef struct DETTemplateCounts  DETTemplateCounts
  864. DETUnloadTemplatesBlock RECORD    0
  865. reqFunction                 ds.l   1        ; offset: $0 (0)
  866. sizeof                     EQU *            ; size:   $4 (4)
  867.                         ENDR
  868.  
  869. ; typedef struct DETUnloadTemplatesBlock  DETUnloadTemplatesBlock
  870. DETCallBackBlock         RECORD    0
  871. protoCallBack             ds.w   11        ; offset: $0 (0)
  872.                          ORG 0
  873. beep                     ds.l   1        ; offset: $0 (0)
  874.                          ORG 0
  875. busy                     ds.l   1        ; offset: $0 (0)
  876.                          ORG 0
  877. changeCallFors             ds.l   6        ; offset: $0 (0)
  878.                          ORG 0
  879. getCommandSelectionCount ds.l   2        ; offset: $0 (0)
  880.                          ORG 0
  881. getCommandItemN             ds.w   11        ; offset: $0 (0)
  882.                          ORG 0
  883. getDSSpec                 ds.l   8        ; offset: $0 (0)
  884.                          ORG 0
  885. getTemplateFSSpec         ds.l   24        ; offset: $0 (0)
  886.                          ORG 0
  887. getOpenEdit                 ds.w   11        ; offset: $0 (0)
  888.                          ORG 0
  889. closeEdit                 ds.l   5        ; offset: $0 (0)
  890.                          ORG 0
  891. getPropertyType             ds.l   6        ; offset: $0 (0)
  892.                          ORG 0
  893. getPropertyNumber         ds.w   13        ; offset: $0 (0)
  894.                          ORG 0
  895. getPropertyRString         ds.w   13        ; offset: $0 (0)
  896.                          ORG 0
  897. getPropertyBinarySize     ds.w   13        ; offset: $0 (0)
  898.                          ORG 0
  899. getPropertyBinary         ds.w   13        ; offset: $0 (0)
  900.                          ORG 0
  901. getPropertyChanged         ds.l   6        ; offset: $0 (0)
  902.                          ORG 0
  903. getPropertyEditable         ds.l   6        ; offset: $0 (0)
  904.                          ORG 0
  905. setPropertyType             ds.l   6        ; offset: $0 (0)
  906.                          ORG 0
  907. setPropertyNumber         ds.w   13        ; offset: $0 (0)
  908.                          ORG 0
  909. setPropertyRString         ds.w   13        ; offset: $0 (0)
  910.                          ORG 0
  911. setPropertyBinary         ds.w   15        ; offset: $0 (0)
  912.                          ORG 0
  913. setPropertyChanged         ds.l   6        ; offset: $0 (0)
  914.                          ORG 0
  915. setPropertyEditable         ds.l   6        ; offset: $0 (0)
  916.                          ORG 0
  917. dirtyProperty             ds.w   11        ; offset: $0 (0)
  918.                          ORG 0
  919. doPropertyCommand         ds.w   13        ; offset: $0 (0)
  920.                          ORG 0
  921. sublistCount             ds.l   6        ; offset: $0 (0)
  922.                          ORG 0
  923. selectedSublistCount     ds.l   6        ; offset: $0 (0)
  924.                          ORG 0
  925. requestSync                 ds.l   5        ; offset: $0 (0)
  926.                          ORG 0
  927. addMenu                     ds.w   17        ; offset: $0 (0)
  928.                          ORG 0
  929. removeMenu                 ds.w   13        ; offset: $0 (0)
  930.                          ORG 0
  931. menuItemRString             ds.w   15        ; offset: $0 (0)
  932.                          ORG 0
  933. openDSSpec                 ds.l   2        ; offset: $0 (0)
  934.                          ORG 0
  935. aboutToTalk                 ds.l   1        ; offset: $0 (0)
  936.                          ORG 0
  937. breakAttribute             ds.w   13        ; offset: $0 (0)
  938.                          ORG 0
  939. saveProperty             ds.w   11        ; offset: $0 (0)
  940.                          ORG 0
  941. getCustomViewUserReference ds.l   6        ; offset: $0 (0)
  942.                          ORG 0
  943. getCustomViewBounds         ds.w   15        ; offset: $0 (0)
  944.                          ORG 0
  945. getResource                 ds.w   15        ; offset: $0 (0)
  946.                          ORG 0
  947. templateCounts             ds.l   3        ; offset: $0 (0)
  948.                          ORG 0
  949. unloadTemplates             ds.l   1        ; offset: $0 (0)
  950.                          ORG 96
  951. sizeof                     EQU *            ; size:   $60 (96)
  952.                         ENDR
  953.  
  954. ; typedef union DETCallBackBlock  DETCallBackBlock
  955. ; typedef DETCallBackBlock     *DETCallBackBlockPtr
  956. ; typedef DETCallBackUPP     DETCallBack
  957. ; Call functions:
  958. ;
  959. ;        reqFunction                        Action
  960. ;        -----------                        ------
  961. ;        kDETcmdInit                        Called once when template is first loaded (good time to allocate private data); returns call-for list
  962. ;        kDETcmdExit                        Called once when template is freed (good time to free private data)
  963. ;
  964. ;        kDETcmdAttributeCreation        New sublist attribute creation about to occur; this gives the template a chance to modify
  965. ;                                        the value that's about to be created; sent to the template that will be used for
  966. ;                                        the main aspect of the new entry
  967. ;
  968. ;        kDETcmdDynamicForwarders        Return a list of dynamically created forwarders
  969. ;
  970. ;        kDETcmdInstanceInit                Called once when instance of template is started (good time to allocate private instance data)
  971. ;        kDETcmdInstanceExit                Called once when instance is ended (good time to free private instance data)
  972. ;
  973. ;        kDETcmdIdle                        Called periodically during idle times
  974. ;
  975. ;        kDETcmdViewListChanged            Called when the info-page view-list (list of enabled views) has changed
  976. ;
  977. ;        kDETcmdValidateSave                Validate save: about to save info-page, return noErr (or kDETDidNotHandle) if it's OK to do so
  978. ;
  979. ;        kDETcmdDropQuery                Drop query: return the appropriate operation for this drag; ask destination
  980. ;        kDETcmdDropMeQuery                Drop query: return the appropriate operation for this drag; ask dropee
  981. ;
  982. ;        kDETcmdAttributeNew                Attribute value new (return kDETDidNotHandle to let normal new processing occur)
  983. ;        kDETcmdAttributeChange            Attribute value change (return kDETDidNotHandle to let normal change processing occur)
  984. ;        kDETcmdAttributeDelete            Attribute value delete (return kDETDidNotHandle to let normal deletion occur); sent to the
  985. ;                                        main aspect of the attribute that's about to be deleted
  986. ;        kDETcmdItemNew                    Target item (record or attribute) has just been created
  987. ;
  988. ;        kDETcmdOpenSelf                    Self open (return noErr to prevent opening; return kDETDidNotHandle to allow it)
  989. ;
  990. ;        kDETcmdDynamicResource            Return a dynamically created resource
  991. ;
  992. ;        kDETcmdShouldSync                Check if the code resource wants to force a sync (update data from catalog)
  993. ;        kDETcmdDoSync                    Give code resource a chance to sync (read in and break all attributes)
  994. ;
  995. ;        kDETcmdPropertyCommand            Command received in the property number range (usually means a button's been pushed)
  996. ;
  997. ;        kDETcmdMaximumTextLength        Return maximum size for text form of property
  998. ;
  999. ;        kDETcmdPropertyDirtied            Property dirtied, need to redraw
  1000. ;
  1001. ;        kDETcmdPatternIn                Custom pattern element encountered on reading in an attribute
  1002. ;        kDETcmdPatternOut                Custom pattern element encountered on writing out an attribute
  1003. ;
  1004. ;        kDETcmdConvertToNumber            Convert from template-defined property type to number
  1005. ;        kDETcmdConvertToRString            Convert from template-defined property type to RString
  1006. ;        kDETcmdConvertFromNumber        Convert from number to template-defined property type
  1007. ;        kDETcmdConvertFromRString        Convert from RString to template-defined property type
  1008. ;
  1009. ;        kDETcmdCustomViewDraw            Custom view draw
  1010. ;        kDETcmdCustomViewMouseDown        Custom view mouse down
  1011. ;
  1012. ;        kDETcmdKeyPress                    Key press (used primarily to filter entry into EditText views)
  1013. ;        kDETcmdPaste                    Paste (used primarily to filter entry into EditText views)
  1014. ;
  1015. ;        kDETcmdCustomMenuSelected        Custom Catalogs menu selected
  1016. ;        kDETcmdCustomMenuEnabled        Return whether custom Catalogs menu entry should be enabled
  1017. ;
  1018.  
  1019. kDETcmdSimpleCall                EQU        0
  1020. kDETcmdInit                        EQU        1
  1021. kDETcmdExit                        EQU        2
  1022. kDETcmdAttributeCreation        EQU        3
  1023. kDETcmdDynamicForwarders        EQU        4
  1024. kDETcmdTargetedCall                EQU        1000
  1025. kDETcmdInstanceInit                EQU        1001
  1026. kDETcmdInstanceExit                EQU        1002
  1027. kDETcmdIdle                        EQU        1003
  1028. kDETcmdViewListChanged            EQU        1004
  1029. kDETcmdValidateSave                EQU        1005
  1030. kDETcmdDropQuery                EQU        1006
  1031. kDETcmdDropMeQuery                EQU        1007
  1032. kDETcmdAttributeNew                EQU        1008
  1033. kDETcmdAttributeChange            EQU        1009
  1034. kDETcmdAttributeDelete            EQU        1010
  1035. kDETcmdItemNew                    EQU        1011
  1036. kDETcmdOpenSelf                    EQU        1012
  1037. kDETcmdDynamicResource            EQU        1013
  1038. kDETcmdShouldSync                EQU        1014
  1039. kDETcmdDoSync                    EQU        1015
  1040. kDETcmdPropertyCall                EQU        2000
  1041. kDETcmdPropertyCommand            EQU        2001
  1042. kDETcmdMaximumTextLength        EQU        2002
  1043. kDETcmdPropertyDirtied            EQU        2003
  1044. kDETcmdPatternIn                EQU        2004
  1045. kDETcmdPatternOut                EQU        2005
  1046. kDETcmdConvertToNumber            EQU        2006
  1047. kDETcmdConvertToRString            EQU        2007
  1048. kDETcmdConvertFromNumber        EQU        2008
  1049. kDETcmdConvertFromRString        EQU        2009
  1050. kDETcmdCustomViewDraw            EQU        2010
  1051. kDETcmdCustomViewMouseDown        EQU        2011
  1052. kDETcmdKeyPress                    EQU        2012
  1053. kDETcmdPaste                    EQU        2013
  1054. kDETcmdCustomMenuSelected        EQU        2014
  1055. kDETcmdCustomMenuEnabled        EQU        2015
  1056. kDETcmdHighCall                    EQU        $F0000000            ; Force the type to be long 
  1057.  
  1058. ; typedef unsigned long     DETCallFunctions
  1059. DETProtoCallBlock         RECORD    0
  1060. reqFunction                 ds.l   1        ; offset: $0 (0)
  1061. callBack                 ds.l   1        ; offset: $4 (4)
  1062. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1063. templatePrivate             ds.l   1        ; offset: $C (12)
  1064. instancePrivate             ds.l   1        ; offset: $10 (16)
  1065. target                     ds.l   4        ; offset: $14 (20)
  1066. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1067. filler1                     ds.b   1        ; offset: $25 (37)
  1068. property                 ds.w   1        ; offset: $26 (38)
  1069. sizeof                     EQU *            ; size:   $28 (40)
  1070.                         ENDR
  1071.  
  1072. ; typedef struct DETProtoCallBlock  DETProtoCallBlock
  1073. DETInitBlock             RECORD    0
  1074. reqFunction                 ds.l   1        ; offset: $0 (0)
  1075. callBack                 ds.l   1        ; offset: $4 (4)
  1076. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1077. templatePrivate             ds.l   1        ; offset: $C (12)
  1078. newCallFors                 ds.l   1        ; offset: $10 (16)        ; <-  New call-for mask 
  1079. sizeof                     EQU *            ; size:   $14 (20)
  1080.                         ENDR
  1081.  
  1082. ; typedef struct DETInitBlock  DETInitBlock
  1083. DETExitBlock             RECORD    0
  1084. reqFunction                 ds.l   1        ; offset: $0 (0)
  1085. callBack                 ds.l   1        ; offset: $4 (4)
  1086. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1087. templatePrivate             ds.l   1        ; offset: $C (12)
  1088. sizeof                     EQU *            ; size:   $10 (16)
  1089.                         ENDR
  1090.  
  1091. ; typedef struct DETExitBlock  DETExitBlock
  1092. DETInstanceInitBlock     RECORD    0
  1093. reqFunction                 ds.l   1        ; offset: $0 (0)
  1094. callBack                 ds.l   1        ; offset: $4 (4)
  1095. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1096. templatePrivate             ds.l   1        ; offset: $C (12)
  1097. instancePrivate             ds.l   1        ; offset: $10 (16)
  1098. target                     ds.l   4        ; offset: $14 (20)
  1099. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1100. filler1                     ds.b   1        ; offset: $25 (37)
  1101. sizeof                     EQU *            ; size:   $26 (38)
  1102.                         ENDR
  1103.  
  1104. ; typedef struct DETInstanceInitBlock  DETInstanceInitBlock
  1105. DETInstanceExitBlock     RECORD    0
  1106. reqFunction                 ds.l   1        ; offset: $0 (0)
  1107. callBack                 ds.l   1        ; offset: $4 (4)
  1108. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1109. templatePrivate             ds.l   1        ; offset: $C (12)
  1110. instancePrivate             ds.l   1        ; offset: $10 (16)
  1111. target                     ds.l   4        ; offset: $14 (20)
  1112. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1113. filler1                     ds.b   1        ; offset: $25 (37)
  1114. sizeof                     EQU *            ; size:   $26 (38)
  1115.                         ENDR
  1116.  
  1117. ; typedef struct DETInstanceExitBlock  DETInstanceExitBlock
  1118. DETInstanceIdleBlock     RECORD    0
  1119. reqFunction                 ds.l   1        ; offset: $0 (0)
  1120. callBack                 ds.l   1        ; offset: $4 (4)
  1121. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1122. templatePrivate             ds.l   1        ; offset: $C (12)
  1123. instancePrivate             ds.l   1        ; offset: $10 (16)
  1124. target                     ds.l   4        ; offset: $14 (20)
  1125. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1126. filler1                     ds.b   1        ; offset: $25 (37)
  1127. sizeof                     EQU *            ; size:   $26 (38)
  1128.                         ENDR
  1129.  
  1130. ; typedef struct DETInstanceIdleBlock  DETInstanceIdleBlock
  1131. DETPropertyCommandBlock RECORD    0
  1132. reqFunction                 ds.l   1        ; offset: $0 (0)
  1133. callBack                 ds.l   1        ; offset: $4 (4)
  1134. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1135. templatePrivate             ds.l   1        ; offset: $C (12)
  1136. instancePrivate             ds.l   1        ; offset: $10 (16)
  1137. target                     ds.l   4        ; offset: $14 (20)
  1138. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1139. filler1                     ds.b   1        ; offset: $25 (37)
  1140. property                 ds.w   1        ; offset: $26 (38)
  1141. parameter                 ds.l   1        ; offset: $28 (40)        ;  -> Parameter of command 
  1142. sizeof                     EQU *            ; size:   $2C (44)
  1143.                         ENDR
  1144.  
  1145. ; typedef struct DETPropertyCommandBlock  DETPropertyCommandBlock
  1146. DETMaximumTextLengthBlock RECORD    0
  1147. reqFunction                 ds.l   1        ; offset: $0 (0)
  1148. callBack                 ds.l   1        ; offset: $4 (4)
  1149. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1150. templatePrivate             ds.l   1        ; offset: $C (12)
  1151. instancePrivate             ds.l   1        ; offset: $10 (16)
  1152. target                     ds.l   4        ; offset: $14 (20)
  1153. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1154. filler1                     ds.b   1        ; offset: $25 (37)
  1155. property                 ds.w   1        ; offset: $26 (38)
  1156. maxSize                     ds.l   1        ; offset: $28 (40)        ; <-  Return the maximum number of characters the user can entry when property is edited in an EditText 
  1157. sizeof                     EQU *            ; size:   $2C (44)
  1158.                         ENDR
  1159.  
  1160. ; typedef struct DETMaximumTextLengthBlock  DETMaximumTextLengthBlock
  1161. DETViewListChangedBlock RECORD    0
  1162. reqFunction                 ds.l   1        ; offset: $0 (0)
  1163. callBack                 ds.l   1        ; offset: $4 (4)
  1164. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1165. templatePrivate             ds.l   1        ; offset: $C (12)
  1166. instancePrivate             ds.l   1        ; offset: $10 (16)
  1167. target                     ds.l   4        ; offset: $14 (20)
  1168. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1169. filler1                     ds.b   1        ; offset: $25 (37)
  1170. sizeof                     EQU *            ; size:   $26 (38)
  1171.                         ENDR
  1172.  
  1173. ; typedef struct DETViewListChangedBlock  DETViewListChangedBlock
  1174. DETPropertyDirtiedBlock RECORD    0
  1175. reqFunction                 ds.l   1        ; offset: $0 (0)
  1176. callBack                 ds.l   1        ; offset: $4 (4)
  1177. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1178. templatePrivate             ds.l   1        ; offset: $C (12)
  1179. instancePrivate             ds.l   1        ; offset: $10 (16)
  1180. target                     ds.l   4        ; offset: $14 (20)
  1181. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1182. filler1                     ds.b   1        ; offset: $25 (37)
  1183. property                 ds.w   1        ; offset: $26 (38)
  1184. sizeof                     EQU *            ; size:   $28 (40)
  1185.                         ENDR
  1186.  
  1187. ; typedef struct DETPropertyDirtiedBlock  DETPropertyDirtiedBlock
  1188. DETValidateSaveBlock     RECORD    0
  1189. reqFunction                 ds.l   1        ; offset: $0 (0)
  1190. callBack                 ds.l   1        ; offset: $4 (4)
  1191. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1192. templatePrivate             ds.l   1        ; offset: $C (12)
  1193. instancePrivate             ds.l   1        ; offset: $10 (16)
  1194. target                     ds.l   4        ; offset: $14 (20)
  1195. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1196. filler1                     ds.b   1        ; offset: $25 (37)
  1197. errorString                 ds.l   1        ; offset: $26 (38)        ; <-  Handle with error string if validation fails (callee must allocate handle, DE will DisposHandle() it) 
  1198. sizeof                     EQU *            ; size:   $2A (42)
  1199.                         ENDR
  1200.  
  1201. ; typedef struct DETValidateSaveBlock  DETValidateSaveBlock
  1202. ; Valid commandIDs for DETDropQueryBlock and DETDropMeQueryBlock (in addition to property numbers): 
  1203.  
  1204. kDETDoNothing                    EQU        'xxx0'
  1205. kDETMove                        EQU        'move'
  1206. kDETDrag                        EQU        'drag'
  1207. kDETAlias                        EQU        'alis'
  1208.  
  1209. DETDropQueryBlock         RECORD    0
  1210. reqFunction                 ds.l   1        ; offset: $0 (0)
  1211. callBack                 ds.l   1        ; offset: $4 (4)
  1212. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1213. templatePrivate             ds.l   1        ; offset: $C (12)
  1214. instancePrivate             ds.l   1        ; offset: $10 (16)
  1215. target                     ds.l   4        ; offset: $14 (20)
  1216. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1217. filler1                     ds.b   1        ; offset: $25 (37)
  1218. modifiers                 ds.w   1        ; offset: $26 (38)        ;  -> Modifiers at drop time (option/control/command/shift keys) 
  1219. commandID                 ds.l   1        ; offset: $28 (40)        ; <-> Command ID (kDETDoNothing, kDETMove, kDETDrag (copy), kDETAlias, or a property number) 
  1220. destinationType             ds.l   9        ; offset: $2C (44)        ; <-> Type to convert attribute to 
  1221. copyToHFS                 ds.b   1        ; offset: $50 (80)        ; <-  If true, object should be copied to HFS before being operated on, and deleted after 
  1222. filler2                     ds.b   1        ; offset: $51 (81)
  1223. sizeof                     EQU *            ; size:   $52 (82)
  1224.                         ENDR
  1225.  
  1226. ; typedef struct DETDropQueryBlock  DETDropQueryBlock
  1227. DETDropMeQueryBlock     RECORD    0
  1228. reqFunction                 ds.l   1        ; offset: $0 (0)
  1229. callBack                 ds.l   1        ; offset: $4 (4)
  1230. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1231. templatePrivate             ds.l   1        ; offset: $C (12)
  1232. instancePrivate             ds.l   1        ; offset: $10 (16)
  1233. target                     ds.l   4        ; offset: $14 (20)
  1234. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1235. filler1                     ds.b   1        ; offset: $25 (37)
  1236. modifiers                 ds.w   1        ; offset: $26 (38)        ;  -> Modifiers at drop time (option/control/command/shift keys) 
  1237. commandID                 ds.l   1        ; offset: $28 (40)        ; <-> Command ID (kDETDoNothing, kDETMove, kDETDrag (copy), kDETAlias, or a property number) 
  1238. destinationType             ds.l   9        ; offset: $2C (44)        ; <-> Type to convert attribute to 
  1239. copyToHFS                 ds.b   1        ; offset: $50 (80)        ; <-  If true, object should be copied to HFS before being operated on, and deleted after 
  1240. filler2                     ds.b   1        ; offset: $51 (81)
  1241. sizeof                     EQU *            ; size:   $52 (82)
  1242.                         ENDR
  1243.  
  1244. ; typedef struct DETDropMeQueryBlock  DETDropMeQueryBlock
  1245. DETAttributeCreationBlock RECORD    0
  1246. reqFunction                 ds.l   1        ; offset: $0 (0)
  1247. callBack                 ds.l   1        ; offset: $4 (4)
  1248. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1249. templatePrivate             ds.l   1        ; offset: $C (12)
  1250. parent                     ds.l   1        ; offset: $10 (16)        ;  -> The object within which the creation will occur 
  1251. refNum                     ds.w   1        ; offset: $14 (20)        ;  -> Refnum for returned address (DSSpecs in PDs only) 
  1252. identity                 ds.l   1        ; offset: $16 (22)        ;  -> The identity we're browsing as in the parent object 
  1253. attrType                 ds.l   9        ; offset: $1A (26)        ; <-> The type of the attribute being created 
  1254. attrTag                     ds.l   1        ; offset: $3E (62)        ; <-> The tag of the attribute being created 
  1255. value                     ds.l   1        ; offset: $42 (66)        ; <-> The value to write (pre-allocated, resize as needed) 
  1256. sizeof                     EQU *            ; size:   $46 (70)
  1257.                         ENDR
  1258.  
  1259. ; typedef struct DETAttributeCreationBlock  DETAttributeCreationBlock
  1260. DETAttributeNewBlock     RECORD    0
  1261. reqFunction                 ds.l   1        ; offset: $0 (0)
  1262. callBack                 ds.l   1        ; offset: $4 (4)
  1263. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1264. templatePrivate             ds.l   1        ; offset: $C (12)
  1265. instancePrivate             ds.l   1        ; offset: $10 (16)
  1266. target                     ds.l   4        ; offset: $14 (20)
  1267. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1268. filler1                     ds.b   1        ; offset: $25 (37)
  1269. parent                     ds.l   1        ; offset: $26 (38)        ;  -> The object within which the creation will occur 
  1270. refNum                     ds.w   1        ; offset: $2A (42)        ;  -> Refnum for returned address (DSSpecs in PDs only) 
  1271. identity                 ds.l   1        ; offset: $2C (44)        ;  -> The identity we're browsing as in the parent object 
  1272. attrType                 ds.l   9        ; offset: $30 (48)        ; <-> The type of the attribute being created 
  1273. attrTag                     ds.l   1        ; offset: $54 (84)        ; <-> The tag of the attribute being created 
  1274. value                     ds.l   1        ; offset: $58 (88)        ; <-> The value to write (pre-allocated, resize as needed) 
  1275. sizeof                     EQU *            ; size:   $5C (92)
  1276.                         ENDR
  1277.  
  1278. ; typedef struct DETAttributeNewBlock  DETAttributeNewBlock
  1279. DETAttributeChangeBlock RECORD    0
  1280. reqFunction                 ds.l   1        ; offset: $0 (0)
  1281. callBack                 ds.l   1        ; offset: $4 (4)
  1282. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1283. templatePrivate             ds.l   1        ; offset: $C (12)
  1284. instancePrivate             ds.l   1        ; offset: $10 (16)
  1285. target                     ds.l   4        ; offset: $14 (20)
  1286. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1287. filler1                     ds.b   1        ; offset: $25 (37)
  1288. parent                     ds.l   1        ; offset: $26 (38)        ;  -> The object within which the creation will occur 
  1289. refNum                     ds.w   1        ; offset: $2A (42)        ;  -> Refnum for returned address (DSSpecs in PDs only) 
  1290. identity                 ds.l   1        ; offset: $2C (44)        ;  -> The identity we're browsing as in the parent object 
  1291. attrType                 ds.l   9        ; offset: $30 (48)        ; <-> The type of the attribute being changed 
  1292. attrTag                     ds.l   1        ; offset: $54 (84)        ; <-> The tag of the attribute being changed 
  1293. attrCID                     ds.l   2        ; offset: $58 (88)        ; <-> The CID of the attribute being changed 
  1294. value                     ds.l   1        ; offset: $60 (96)        ; <-> The value to write (pre-allocated, resize as needed) 
  1295. sizeof                     EQU *            ; size:   $64 (100)
  1296.                         ENDR
  1297.  
  1298. ; typedef struct DETAttributeChangeBlock  DETAttributeChangeBlock
  1299. DETAttributeDeleteBlock RECORD    0
  1300. reqFunction                 ds.l   1        ; offset: $0 (0)
  1301. callBack                 ds.l   1        ; offset: $4 (4)
  1302. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1303. templatePrivate             ds.l   1        ; offset: $C (12)
  1304. instancePrivate             ds.l   1        ; offset: $10 (16)
  1305. target                     ds.l   4        ; offset: $14 (20)
  1306. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1307. filler1                     ds.b   1        ; offset: $25 (37)
  1308. dsSpec                     ds.l   1        ; offset: $26 (38)        ;  -> The object which will be deleted 
  1309. refNum                     ds.w   1        ; offset: $2A (42)        ;  -> Refnum for returned address (DSSpecs in PDs only) 
  1310. identity                 ds.l   1        ; offset: $2C (44)        ;  -> The identity we're browsing as 
  1311. sizeof                     EQU *            ; size:   $30 (48)
  1312.                         ENDR
  1313.  
  1314. ; typedef struct DETAttributeDeleteBlock  DETAttributeDeleteBlock
  1315. DETItemNewBlock         RECORD    0
  1316. reqFunction                 ds.l   1        ; offset: $0 (0)
  1317. callBack                 ds.l   1        ; offset: $4 (4)
  1318. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1319. templatePrivate             ds.l   1        ; offset: $C (12)
  1320. instancePrivate             ds.l   1        ; offset: $10 (16)
  1321. target                     ds.l   4        ; offset: $14 (20)
  1322. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1323. filler1                     ds.b   1        ; offset: $25 (37)
  1324. sizeof                     EQU *            ; size:   $26 (38)
  1325.                         ENDR
  1326.  
  1327. ; typedef struct DETItemNewBlock  DETItemNewBlock
  1328. DETShouldSyncBlock         RECORD    0
  1329. reqFunction                 ds.l   1        ; offset: $0 (0)
  1330. callBack                 ds.l   1        ; offset: $4 (4)
  1331. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1332. templatePrivate             ds.l   1        ; offset: $C (12)
  1333. instancePrivate             ds.l   1        ; offset: $10 (16)
  1334. target                     ds.l   4        ; offset: $14 (20)
  1335. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1336. filler1                     ds.b   1        ; offset: $25 (37)
  1337. shouldSync                 ds.b   1        ; offset: $26 (38)        ; <-  True if we should now sync with catalog 
  1338. filler2                     ds.b   1        ; offset: $27 (39)
  1339. sizeof                     EQU *            ; size:   $28 (40)
  1340.                         ENDR
  1341.  
  1342. ; typedef struct DETShouldSyncBlock  DETShouldSyncBlock
  1343. DETDoSyncBlock             RECORD    0
  1344. reqFunction                 ds.l   1        ; offset: $0 (0)
  1345. callBack                 ds.l   1        ; offset: $4 (4)
  1346. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1347. templatePrivate             ds.l   1        ; offset: $C (12)
  1348. instancePrivate             ds.l   1        ; offset: $10 (16)
  1349. target                     ds.l   4        ; offset: $14 (20)
  1350. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1351. filler1                     ds.b   1        ; offset: $25 (37)
  1352. sizeof                     EQU *            ; size:   $26 (38)
  1353.                         ENDR
  1354.  
  1355. ; typedef struct DETDoSyncBlock  DETDoSyncBlock
  1356. DETPatternInBlock         RECORD    0
  1357. reqFunction                 ds.l   1        ; offset: $0 (0)
  1358. callBack                 ds.l   1        ; offset: $4 (4)
  1359. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1360. templatePrivate             ds.l   1        ; offset: $C (12)
  1361. instancePrivate             ds.l   1        ; offset: $10 (16)
  1362. target                     ds.l   4        ; offset: $14 (20)
  1363. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1364. filler1                     ds.b   1        ; offset: $25 (37)
  1365. property                 ds.w   1        ; offset: $26 (38)
  1366. elementType                 ds.l   1        ; offset: $28 (40)        ;  -> Element type from pattern 
  1367. extra                     ds.l   1        ; offset: $2C (44)        ;  -> Extra field from pattern 
  1368. attribute                 ds.l   1        ; offset: $30 (48)        ;  -> The complete attribute 
  1369. dataOffset                 ds.l   1        ; offset: $34 (52)        ; <-> Offset to current (next) byte 
  1370. bitOffset                 ds.w   1        ; offset: $38 (56)        ; <-> Bit offset (next bit is *fData >> fBitOffset++) 
  1371. sizeof                     EQU *            ; size:   $3A (58)
  1372.                         ENDR
  1373.  
  1374. ; typedef struct DETPatternInBlock  DETPatternInBlock
  1375. DETPatternOutBlock         RECORD    0
  1376. reqFunction                 ds.l   1        ; offset: $0 (0)
  1377. callBack                 ds.l   1        ; offset: $4 (4)
  1378. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1379. templatePrivate             ds.l   1        ; offset: $C (12)
  1380. instancePrivate             ds.l   1        ; offset: $10 (16)
  1381. target                     ds.l   4        ; offset: $14 (20)
  1382. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1383. filler1                     ds.b   1        ; offset: $25 (37)
  1384. property                 ds.w   1        ; offset: $26 (38)
  1385. elementType                 ds.l   1        ; offset: $28 (40)        ;  -> Element type from pattern 
  1386. extra                     ds.l   1        ; offset: $2C (44)        ;  -> Extra field from pattern 
  1387. attribute                 ds.l   1        ; offset: $30 (48)        ;  -> The attribute (minus the data portion) 
  1388. data                     ds.l   1        ; offset: $34 (52)        ;  -> Data to be written (pre-allocated, resize and add at end) 
  1389. dataOffset                 ds.l   1        ; offset: $38 (56)        ; <-> Offset to next byte to write 
  1390. bitOffset                 ds.w   1        ; offset: $3C (60)        ; <-> Bit offset (if zero, handle will need to be resized to one more byte before write) 
  1391. sizeof                     EQU *            ; size:   $3E (62)
  1392.                         ENDR
  1393.  
  1394. ; typedef struct DETPatternOutBlock  DETPatternOutBlock
  1395. DETOpenSelfBlock         RECORD    0
  1396. reqFunction                 ds.l   1        ; offset: $0 (0)
  1397. callBack                 ds.l   1        ; offset: $4 (4)
  1398. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1399. templatePrivate             ds.l   1        ; offset: $C (12)
  1400. instancePrivate             ds.l   1        ; offset: $10 (16)
  1401. target                     ds.l   4        ; offset: $14 (20)
  1402. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1403. filler1                     ds.b   1        ; offset: $25 (37)
  1404. modifiers                 ds.w   1        ; offset: $26 (38)        ;  -> Modifiers at open time (option/control/command/shift keys) 
  1405. sizeof                     EQU *            ; size:   $28 (40)
  1406.                         ENDR
  1407.  
  1408. ; typedef struct DETOpenSelfBlock  DETOpenSelfBlock
  1409. DETConvertToNumberBlock RECORD    0
  1410. reqFunction                 ds.l   1        ; offset: $0 (0)
  1411. callBack                 ds.l   1        ; offset: $4 (4)
  1412. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1413. templatePrivate             ds.l   1        ; offset: $C (12)
  1414. instancePrivate             ds.l   1        ; offset: $10 (16)
  1415. target                     ds.l   4        ; offset: $14 (20)
  1416. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1417. filler1                     ds.b   1        ; offset: $25 (37)
  1418. property                 ds.w   1        ; offset: $26 (38)
  1419. theValue                 ds.l   1        ; offset: $28 (40)        ; <-  The converted value to return 
  1420. sizeof                     EQU *            ; size:   $2C (44)
  1421.                         ENDR
  1422.  
  1423. ; typedef struct DETConvertToNumberBlock  DETConvertToNumberBlock
  1424. DETConvertToRStringBlock RECORD    0
  1425. reqFunction                 ds.l   1        ; offset: $0 (0)
  1426. callBack                 ds.l   1        ; offset: $4 (4)
  1427. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1428. templatePrivate             ds.l   1        ; offset: $C (12)
  1429. instancePrivate             ds.l   1        ; offset: $10 (16)
  1430. target                     ds.l   4        ; offset: $14 (20)
  1431. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1432. filler1                     ds.b   1        ; offset: $25 (37)
  1433. property                 ds.w   1        ; offset: $26 (38)
  1434. theValue                 ds.l   1        ; offset: $28 (40)        ; <-  A handle with the converted value (callee must allocate handle, DE will DisposHandle() it) 
  1435. sizeof                     EQU *            ; size:   $2C (44)
  1436.                         ENDR
  1437.  
  1438. ; typedef struct DETConvertToRStringBlock  DETConvertToRStringBlock
  1439. DETConvertFromNumberBlock RECORD    0
  1440. reqFunction                 ds.l   1        ; offset: $0 (0)
  1441. callBack                 ds.l   1        ; offset: $4 (4)
  1442. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1443. templatePrivate             ds.l   1        ; offset: $C (12)
  1444. instancePrivate             ds.l   1        ; offset: $10 (16)
  1445. target                     ds.l   4        ; offset: $14 (20)
  1446. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1447. filler1                     ds.b   1        ; offset: $25 (37)
  1448. property                 ds.w   1        ; offset: $26 (38)
  1449. theValue                 ds.l   1        ; offset: $28 (40)        ;  -> The value to convert (result should be written direct to the property) 
  1450. sizeof                     EQU *            ; size:   $2C (44)
  1451.                         ENDR
  1452.  
  1453. ; typedef struct DETConvertFromNumberBlock  DETConvertFromNumberBlock
  1454. DETConvertFromRStringBlock RECORD    0
  1455. reqFunction                 ds.l   1        ; offset: $0 (0)
  1456. callBack                 ds.l   1        ; offset: $4 (4)
  1457. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1458. templatePrivate             ds.l   1        ; offset: $C (12)
  1459. instancePrivate             ds.l   1        ; offset: $10 (16)
  1460. target                     ds.l   4        ; offset: $14 (20)
  1461. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1462. filler1                     ds.b   1        ; offset: $25 (37)
  1463. property                 ds.w   1        ; offset: $26 (38)
  1464. theValue                 ds.l   1        ; offset: $28 (40)        ;  -> The value to convert (result should be written direct to the property) 
  1465. sizeof                     EQU *            ; size:   $2C (44)
  1466.                         ENDR
  1467.  
  1468. ; typedef struct DETConvertFromRStringBlock  DETConvertFromRStringBlock
  1469. DETCustomViewDrawBlock     RECORD    0
  1470. reqFunction                 ds.l   1        ; offset: $0 (0)
  1471. callBack                 ds.l   1        ; offset: $4 (4)
  1472. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1473. templatePrivate             ds.l   1        ; offset: $C (12)
  1474. instancePrivate             ds.l   1        ; offset: $10 (16)
  1475. target                     ds.l   4        ; offset: $14 (20)
  1476. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1477. filler1                     ds.b   1        ; offset: $25 (37)
  1478. property                 ds.w   1        ; offset: $26 (38)
  1479. sizeof                     EQU *            ; size:   $28 (40)
  1480.                         ENDR
  1481.  
  1482. ; typedef struct DETCustomViewDrawBlock  DETCustomViewDrawBlock
  1483. DETCustomViewMouseDownBlock RECORD    0
  1484. reqFunction                 ds.l   1        ; offset: $0 (0)
  1485. callBack                 ds.l   1        ; offset: $4 (4)
  1486. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1487. templatePrivate             ds.l   1        ; offset: $C (12)
  1488. instancePrivate             ds.l   1        ; offset: $10 (16)
  1489. target                     ds.l   4        ; offset: $14 (20)
  1490. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1491. filler1                     ds.b   1        ; offset: $25 (37)
  1492. property                 ds.w   1        ; offset: $26 (38)
  1493. theEvent                 ds.l   1        ; offset: $28 (40)        ;  -> The original event record of the mouse-down 
  1494. sizeof                     EQU *            ; size:   $2C (44)
  1495.                         ENDR
  1496.  
  1497. ; typedef struct DETCustomViewMouseDownBlock  DETCustomViewMouseDownBlock
  1498. DETKeyPressBlock         RECORD    0
  1499. reqFunction                 ds.l   1        ; offset: $0 (0)
  1500. callBack                 ds.l   1        ; offset: $4 (4)
  1501. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1502. templatePrivate             ds.l   1        ; offset: $C (12)
  1503. instancePrivate             ds.l   1        ; offset: $10 (16)
  1504. target                     ds.l   4        ; offset: $14 (20)
  1505. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1506. filler1                     ds.b   1        ; offset: $25 (37)
  1507. property                 ds.w   1        ; offset: $26 (38)
  1508. theEvent                 ds.l   1        ; offset: $28 (40)        ;  -> The original event record of the key-press 
  1509. sizeof                     EQU *            ; size:   $2C (44)
  1510.                         ENDR
  1511.  
  1512. ; typedef struct DETKeyPressBlock  DETKeyPressBlock
  1513. DETPasteBlock             RECORD    0
  1514. reqFunction                 ds.l   1        ; offset: $0 (0)
  1515. callBack                 ds.l   1        ; offset: $4 (4)
  1516. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1517. templatePrivate             ds.l   1        ; offset: $C (12)
  1518. instancePrivate             ds.l   1        ; offset: $10 (16)
  1519. target                     ds.l   4        ; offset: $14 (20)
  1520. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1521. filler1                     ds.b   1        ; offset: $25 (37)
  1522. property                 ds.w   1        ; offset: $26 (38)
  1523. modifiers                 ds.w   1        ; offset: $28 (40)        ;  -> Modifiers at paste time (option/control/command/shift keys) 
  1524. sizeof                     EQU *            ; size:   $2A (42)
  1525.                         ENDR
  1526.  
  1527. ; typedef struct DETPasteBlock  DETPasteBlock
  1528. DETCustomMenuSelectedBlock RECORD    0
  1529. reqFunction                 ds.l   1        ; offset: $0 (0)
  1530. callBack                 ds.l   1        ; offset: $4 (4)
  1531. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1532. templatePrivate             ds.l   1        ; offset: $C (12)
  1533. instancePrivate             ds.l   1        ; offset: $10 (16)
  1534. target                     ds.l   4        ; offset: $14 (20)
  1535. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1536. filler1                     ds.b   1        ; offset: $25 (37)
  1537. menuTableParameter         ds.w   1        ; offset: $26 (38)        ;  -> The "property" field from the custom menu table 
  1538. sizeof                     EQU *            ; size:   $28 (40)
  1539.                         ENDR
  1540.  
  1541. ; typedef struct DETCustomMenuSelectedBlock  DETCustomMenuSelectedBlock
  1542. DETCustomMenuEnabledBlock RECORD    0
  1543. reqFunction                 ds.l   1        ; offset: $0 (0)
  1544. callBack                 ds.l   1        ; offset: $4 (4)
  1545. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1546. templatePrivate             ds.l   1        ; offset: $C (12)
  1547. instancePrivate             ds.l   1        ; offset: $10 (16)
  1548. target                     ds.l   4        ; offset: $14 (20)
  1549. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1550. filler1                     ds.b   1        ; offset: $25 (37)
  1551. menuTableParameter         ds.w   1        ; offset: $26 (38)        ;  -> The "property" field from the custom menu table 
  1552. enable                     ds.b   1        ; offset: $28 (40)        ; <-  Whether to enable the menu item 
  1553. filler2                     ds.b   1        ; offset: $29 (41)
  1554. sizeof                     EQU *            ; size:   $2A (42)
  1555.                         ENDR
  1556.  
  1557. ; typedef struct DETCustomMenuEnabledBlock  DETCustomMenuEnabledBlock
  1558. ; typedef struct DETForwarderListItem  DETForwarderListItem
  1559. ; typedef DETForwarderListItem  *DETForwarderListItemPtr
  1560. DETForwarderListItem     RECORD    0
  1561. next                     ds.l   1        ; offset: $0 (0)        ; Pointer to next item, or nil 
  1562. attributeValueTag         ds.l   1        ; offset: $4 (4)        ; Tag of new templates (0 for none) 
  1563. rstrs                     ds.l   256        ; offset: $8 (8)        ; Record type (empty if none), attrbute type (empty if none),
  1564. ;                                                list of template names to forward to 
  1565. sizeof                     EQU *            ; size:   $408 (1032)
  1566.                         ENDR
  1567.  
  1568. ; typedef DETForwarderListItemPtr  *DETForwarderListHandle
  1569. DETDynamicForwardersBlock RECORD    0
  1570. reqFunction                 ds.l   1        ; offset: $0 (0)
  1571. callBack                 ds.l   1        ; offset: $4 (4)
  1572. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1573. templatePrivate             ds.l   1        ; offset: $C (12)
  1574. forwarders                 ds.l   1        ; offset: $10 (16)        ; <-  List of forwaders 
  1575. sizeof                     EQU *            ; size:   $14 (20)
  1576.                         ENDR
  1577.  
  1578. ; typedef struct DETDynamicForwardersBlock  DETDynamicForwardersBlock
  1579. DETDynamicResourceBlock RECORD    0
  1580. reqFunction                 ds.l   1        ; offset: $0 (0)
  1581. callBack                 ds.l   1        ; offset: $4 (4)
  1582. callBackPrivate             ds.l   1        ; offset: $8 (8)
  1583. templatePrivate             ds.l   1        ; offset: $C (12)
  1584. instancePrivate             ds.l   1        ; offset: $10 (16)
  1585. target                     ds.l   4        ; offset: $14 (20)
  1586. targetIsMainAspect         ds.b   1        ; offset: $24 (36)
  1587. filler1                     ds.b   1        ; offset: $25 (37)
  1588. resourceType             ds.l   1        ; offset: $26 (38)        ;  -> The resource type being requested 
  1589. propertyNumber             ds.w   1        ; offset: $2A (42)        ;  -> The property number of the resource being requested 
  1590. resourceID                 ds.w   1        ; offset: $2C (44)        ;  -> The resource ID (base ID + property number) of the resource 
  1591. theResource                 ds.l   1        ; offset: $2E (46)        ; <-  The requested resource 
  1592. sizeof                     EQU *            ; size:   $32 (50)
  1593.                         ENDR
  1594.  
  1595. ; typedef struct DETDynamicResourceBlock  DETDynamicResourceBlock
  1596. DETCallBlock             RECORD    0
  1597. protoCall                 ds.l   10        ; offset: $0 (0)
  1598.                          ORG 0
  1599. init                     ds.l   5        ; offset: $0 (0)
  1600.                          ORG 0
  1601. exit                     ds.l   4        ; offset: $0 (0)
  1602.                          ORG 0
  1603. instanceInit             ds.w   19        ; offset: $0 (0)
  1604.                          ORG 0
  1605. instanceExit             ds.w   19        ; offset: $0 (0)
  1606.                          ORG 0
  1607. instanceIdle             ds.w   19        ; offset: $0 (0)
  1608.                          ORG 0
  1609. propertyCommand             ds.l   11        ; offset: $0 (0)
  1610.                          ORG 0
  1611. maximumTextLength         ds.l   11        ; offset: $0 (0)
  1612.                          ORG 0
  1613. viewListChanged             ds.w   19        ; offset: $0 (0)
  1614.                          ORG 0
  1615. propertyDirtied             ds.l   10        ; offset: $0 (0)
  1616.                          ORG 0
  1617. validateSave             ds.w   21        ; offset: $0 (0)
  1618.                          ORG 0
  1619. dropQuery                 ds.w   41        ; offset: $0 (0)
  1620.                          ORG 0
  1621. dropMeQuery                 ds.w   41        ; offset: $0 (0)
  1622.                          ORG 0
  1623. attributeCreationBlock     ds.w   35        ; offset: $0 (0)
  1624.                          ORG 0
  1625. attributeNew             ds.l   23        ; offset: $0 (0)
  1626.                          ORG 0
  1627. attributeChange             ds.l   25        ; offset: $0 (0)
  1628.                          ORG 0
  1629. attributeDelete             ds.l   12        ; offset: $0 (0)
  1630.                          ORG 0
  1631. itemNew                     ds.w   19        ; offset: $0 (0)
  1632.                          ORG 0
  1633. patternIn                 ds.w   29        ; offset: $0 (0)
  1634.                          ORG 0
  1635. patternOut                 ds.w   31        ; offset: $0 (0)
  1636.                          ORG 0
  1637. shouldSync                 ds.l   10        ; offset: $0 (0)
  1638.                          ORG 0
  1639. doSync                     ds.w   19        ; offset: $0 (0)
  1640.                          ORG 0
  1641. openSelf                 ds.l   10        ; offset: $0 (0)
  1642.                          ORG 0
  1643. convertToNumber             ds.l   11        ; offset: $0 (0)
  1644.                          ORG 0
  1645. convertToRString         ds.l   11        ; offset: $0 (0)
  1646.                          ORG 0
  1647. convertFromNumber         ds.l   11        ; offset: $0 (0)
  1648.                          ORG 0
  1649. convertFromRString         ds.l   11        ; offset: $0 (0)
  1650.                          ORG 0
  1651. customViewDraw             ds.l   10        ; offset: $0 (0)
  1652.                          ORG 0
  1653. customViewMouseDown         ds.l   11        ; offset: $0 (0)
  1654.                          ORG 0
  1655. keyPress                 ds.l   11        ; offset: $0 (0)
  1656.                          ORG 0
  1657. paste                     ds.w   21        ; offset: $0 (0)
  1658.                          ORG 0
  1659. customMenuSelected         ds.l   10        ; offset: $0 (0)
  1660.                          ORG 0
  1661. customMenuEnabled         ds.w   21        ; offset: $0 (0)
  1662.                          ORG 0
  1663. dynamicForwarders         ds.l   5        ; offset: $0 (0)
  1664.                          ORG 0
  1665. dynamicResource             ds.w   25        ; offset: $0 (0)
  1666.                          ORG 100
  1667. sizeof                     EQU *            ; size:   $64 (100)
  1668.                         ENDR
  1669.  
  1670. ; typedef union DETCallBlock  DETCallBlock
  1671. ; typedef DETCallBlock         *DETCallBlockPtr
  1672.  
  1673. kDETCallForOther                EQU        1                    ; Call for things not listed below (also auto-enabled by DE if any of the below are enabled) 
  1674. kDETCallForIdle                    EQU        2                    ; kDETcmdIdle 
  1675. kDETCallForCommands                EQU        4                    ; kDETcmdPropertyCommand, kDETcmdSelfOpen 
  1676. kDETCallForViewChanges            EQU        8                    ; kDETcmdViewListChanged, kDETcmdPropertyDirtied, kDETcmdMaximumTextLength 
  1677. kDETCallForDrops                EQU        $10                    ; kDETcmdDropQuery, kDETcmdDropMeQuery 
  1678. kDETCallForAttributes            EQU        $20                    ; kDETcmdAttributeCreation, kDETcmdAttributeNew, kDETcmdAttributeChange, kDETcmdAttributeDelete 
  1679. kDETCallForValidation            EQU        $40                    ; kDETcmdValidateSave 
  1680. kDETCallForKeyPresses            EQU        $80                    ; kDETcmdKeyPress and kDETcmdPaste 
  1681. kDETCallForResources            EQU        $100                ; kDETcmdDynamicResource 
  1682. kDETCallForSyncing                EQU        $200                ; kDETcmdShouldSync, kDETcmdDoSync 
  1683. kDETCallForEscalation            EQU        $8000                ; All calls escalated from the next lower level 
  1684. kDETCallForNothing                EQU        0                    ; None of the above
  1685. ;    * All of the above 
  1686. kDETCallForEverything            EQU        $FFFFFFFF
  1687.  
  1688. ; typedef DETCallUPP         DETCall
  1689. ; This following macro saves you from having to dig out the call-back pointer from the call block: 
  1690.  
  1691. kSAMFirstDevProperty            EQU        40 + 10
  1692.  
  1693. ;
  1694. ;    SAM templates have additional resources/properties that are required
  1695. ;    for interaction with the AOCE Key Chain.
  1696. ;    
  1697. ;     Type    Offset                        Description
  1698. ;     ----    ------                        -----------
  1699. ;    'rstr'    kSAMAspectUserName            The user name
  1700. ;    'rstr'    kSAMAspectKind                The kind of SAM
  1701. ;    'detn'    kSAMAspectCannotDelete        If 0, then the slot cannot be deleted
  1702. ;    'sami'    kSAMAspectSlotCreationInfo    The info required to create a slot record
  1703. ;
  1704. kSAMAspectUserName                EQU        40 + 1
  1705. kSAMAspectKind                    EQU        40 + 2
  1706. kSAMAspectCannotDelete            EQU        40 + 3
  1707. kSAMAspectSlotCreationInfo        EQU        40 + 4
  1708.  
  1709. ;*************************************************************************************
  1710. ; ********************************* Admin Definitions: *********************************
  1711. ; *************************************************************************************
  1712. kDETAdminVersion                EQU        -978
  1713.  
  1714.     ENDIF ; __OCETEMPLATES__
  1715.